package com.cskaoyan.servlet;

import com.cskaoyan.bean.common.BaseRespVo;
<<<<<<< HEAD
import com.cskaoyan.service.AdminProfileService;
import com.cskaoyan.service.AdminProfileServiceImpl;
=======
import com.cskaoyan.service.AdminService;
import com.cskaoyan.service.AdminServiceImpl;
>>>>>>> 1bf96dc65a621d03744cd1efb3f2dfec130f1458
import com.cskaoyan.util.JacksonUtil;
import lombok.SneakyThrows;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;

/**
<<<<<<< HEAD
 * @ClassName: AdminProfileServlet
 * @Description: TODO
 * @Author: jenyutao@gmail.com
 * @date: 2023/6/2 15:27
 * @Version: V1.0
 */
@WebServlet("/admin/profile/*")
public class AdminProfileServlet extends WdBaseServlet{
    private AdminProfileService adminProfileService = new AdminProfileServiceImpl();
    @SneakyThrows
    private BaseRespVo password(HttpServletRequest request, HttpServletResponse response){
        String s = request.getReader().readLine();
        Map read = JacksonUtil.read(s, Map.class);
        BaseRespVo baseRespVo = adminProfileService.updatePassword(read);
        return baseRespVo;
=======
 * @author Yuye Wang
 * @date 2023/6/2 14:19
 * @description TODO
 */
@WebServlet("/admin/profile/password")
public class AdminProfileServlet extends WdBaseServlet {
    private AdminService adminService = new AdminServiceImpl();

    @SneakyThrows
    private BaseRespVo password(HttpServletRequest request, HttpServletResponse response) {
        String jasonStr = request.getReader().readLine();
        Map passwordMap = JacksonUtil.read(jasonStr, Map.class);
        return adminService.modifyPassword(passwordMap);
>>>>>>> 1bf96dc65a621d03744cd1efb3f2dfec130f1458
    }
}
